diff options
| author | Factiven <[email protected]> | 2023-07-16 22:35:39 +0700 |
|---|---|---|
| committer | Factiven <[email protected]> | 2023-07-16 22:35:39 +0700 |
| commit | 1eee181e219dfd993d396ac3169e7aad3dd285eb (patch) | |
| tree | 23fe54e9c3f8810f3ac9ab6b29070b4f0d4b9d20 /pages/api/auth/[...nextauth].js | |
| parent | removed console.log (diff) | |
| download | moopa-1eee181e219dfd993d396ac3169e7aad3dd285eb.tar.xz moopa-1eee181e219dfd993d396ac3169e7aad3dd285eb.zip | |
Update v3.6.4
- Added Manga page with a working tracker for AniList user
- Added schedule component to home page
- Added disqus comment section so you can fight on each other (not recommended)
- Added /id and /en route for english and indonesian subs (id route still work in progress)
Diffstat (limited to 'pages/api/auth/[...nextauth].js')
| -rw-r--r-- | pages/api/auth/[...nextauth].js | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/pages/api/auth/[...nextauth].js b/pages/api/auth/[...nextauth].js index 713b5f7..f270e7a 100644 --- a/pages/api/auth/[...nextauth].js +++ b/pages/api/auth/[...nextauth].js @@ -1,6 +1,24 @@ import NextAuth from "next-auth"; import { GET_CURRENT_USER } from "../../../queries"; -import { client } from "../../../lib/apolloClient"; +import { ApolloClient, InMemoryCache } from "@apollo/client"; + +const defaultOptions = { + watchQuery: { + fetchPolicy: "no-cache", + errorPolicy: "ignore", + }, + query: { + fetchPolicy: "no-cache", + errorPolicy: "all", + }, +}; + +const client = new ApolloClient({ + uri: "https://graphql.anilist.co", + cache: new InMemoryCache(), + defaultOptions: defaultOptions, +}); + // import clientPromise from "../../../lib/mongodb"; // import { MongoDBAdapter } from "@next-auth/mongodb-adapter"; |